﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using XtremBiking.Logica.Enumerados.Usuarios;

namespace XtremBiking.Web.Models.Usuarios
{
    public class ViewUsers
    {

        public long IdUsuario { get; set; }

        [Display(Name = "DisplayName", ResourceType = typeof(Recursos.Modelos.Usuarios.CreateUser))]
       // [Required(AllowEmptyStrings = false, ErrorMessageResourceName = "NameRequired", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.CreateUser))]
        [StringLength(50, ErrorMessageResourceName = "NameMaxChars", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.CreateUser))]
        public string Nombre { get; set; }

        [Display(Name = "DisplaySurname", ResourceType = typeof(Recursos.Modelos.Usuarios.CreateUser))]
       // [Required(AllowEmptyStrings = false, ErrorMessageResourceName = "SurnameRequired", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.CreateUser))]
        [StringLength(50, ErrorMessageResourceName = "SurnameMaxChars", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.CreateUser))]
        public string Apellidos { get; set; }

        //[Required(AllowEmptyStrings = false, ErrorMessageResourceName = "EmailRequired", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.CreateUser))]
        [DataType(DataType.EmailAddress)]
        [RegularExpression(@"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*", ErrorMessageResourceName = "EmailNotValid", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.CreateUser))]
        [Display(Name = "DisplayEmail", ResourceType = typeof(Recursos.Modelos.Usuarios.CreateUser))]
        [StringLength(50, ErrorMessageResourceName = "MailMaxChars", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.CreateUser))]
        public string Mail { get; set; }

        [Display(Name = "DisplayPerfil", ResourceType = typeof(Recursos.Modelos.Usuarios.CreateUser))]
        //[Required(AllowEmptyStrings = false, ErrorMessageResourceName = "PerfilRequired", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.CreateUser))]
        public Perfil PerfilUsuario { get; set; }

        [Display(Name = "DisplayLevel", ResourceType = typeof(Recursos.Modelos.Usuarios.CreateUser))]
        //[Required(AllowEmptyStrings = false, ErrorMessageResourceName = "LevelRequired", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.CreateUser))]
        public Nivel NivelUsuario { get; set; }


    }
}